package com.demo.user.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author: xxh
 * @date: 2022/6/24
 **/
@Component
@Data
public class AppEnv {
    @Value("${es.enable:false}")
    private boolean esEnable;
    @Value("${es.aliyun.cluster.open:false}")
    private boolean esAliyunClusterOpen;
    @Value("${es.hostname:192.168.95.186}")
    private String esHostName;

    @Value("${es.aliyun.auth.username:null}")
    private String esUserName;
    @Value("${es.aliyun.auth.password:null}")
    private String esPassword;

    @Value("${env.is.prod:false}")
    private boolean prodEnv;

    @Value("${env.is.test:false}")
    private boolean testEnv;

    @Value("${env.is.local:false}")
    private boolean localEnv;

    @Value("${env.is.pre:false}")
    private boolean preEnv;

    @Value("${send.verify:true}")
    private boolean sendVerify;

    @Value("${init.password:}")
    private String initPassword;

    public boolean isEsEnable() {
        return this.esEnable;
    }

    public boolean isEsAliyunClusterOpen() {
        return this.esAliyunClusterOpen;
    }

    public boolean isSendVerify() {
        return sendVerify;
    }
}
